[Bugfix] Resolve B12X modules before Dynamo tracing - #53326
Open
lukealonso wants to merge 1 commit into
Open
Conversation
Import optional B12X modules when the utility module loads so compiled forwards only perform dictionary lookups. Add a fullgraph regression test for the accessor path. Assisted-by: OpenAI Codex Signed-off-by: Luke Alonso <lalonso@gmail.com>
lukealonso
marked this pull request as ready for review
August 21, 2026 22:22
|
@mgoin - can we please merge this one? Fixes vLLM crashing with an exception after model loading. |
mgoin
approved these changes
Aug 21, 2026
mgoin
enabled auto-merge (squash)
August 21, 2026 22:34
Member
|
/ci run |
|
✅ Triggered Buildkite CI #85125 for commit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Resolve optional B12X modules before TorchDynamo traces model forwards. The B12X accessors previously used
functools.cachearoundimportlib.import_module; Dynamo unwraps cached functions and can trace the import during the memory-profile forward. Import attempts now happen whenvllm.utils.b12xloads, while runtime accessors perform dictionary lookups only.This allows B12X linear kernels to run with vLLM model compilation enabled instead of requiring compilation mode
NONE.Duplicate-work checks found no open issue or PR addressing the B12X/Dynamo import path. AI assistance was used to diagnose, implement, and validate this change; the submitter reviewed the resulting diff.
Test Plan
The regression test calls the B12X accessor from a
torch.compile(backend="eager", fullgraph=True)function.Test Result
1 passed.